package cn.lingyangwl.framework.data.mate.fieldbind;

import cn.lingyangwl.framework.data.mate.fieldbind.inter.IFieldBindAnnotationDataGetter;
import cn.lingyangwl.framework.data.mate.annotations.FieldBind;
import cn.lingyangwl.framework.data.mate.fieldbind.model.FieldBindAnnotationData;
import org.springframework.stereotype.Component;

/**
 * @author shenguangyang
 */
@Component
public class DefaultFieldBindAnnotationGetter implements IFieldBindAnnotationDataGetter<FieldBind> {
    @Override
    public FieldBindAnnotationData initFieldBindAnnotation(FieldBind fieldBind) {
        return FieldBindAnnotationData.builder().type(fieldBind.type()).target(fieldBind.target())
                .delimiter(fieldBind.delimiter()).build();
    }
}
